<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./js/jquery.js"></script>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      .box {
        width: 500px;
        height: 300px;
        border: 1px solid rebeccapurple;
        margin: 20px auto;
      }
      ul {
        list-style: none;
        width: 100%;
        height: 45px;
      }
      ul li {
        float: left;
        width: 123px;
        height: 45px;
        text-align: center;
        line-height: 45px;
        border: 1px solid rebeccapurple;
        cursor: pointer;
      }
      .active {
        background-color: chocolate;
        color: aliceblue;
      }
      .box_bottom {
        width: 100%;
        height: 255px;
        position: relative;
      }
      .box_bottom .item {
        width: 100%;
        height: 255px;
        text-align: center;
        line-height: 255px;
        color: aliceblue;
        font-size: 30px;
        position: absolute;
        display: none;
      }
      .a {
        background-color: blueviolet;
      }
      .b {
        background-color: rgb(42, 196, 55);
      }
       .c {
        background-color: rgb(187, 50, 157);
      }
       .d {
        background-color: rgb(196, 142, 42);
      }
    </style>
  </head>
  <body>
    <div class="box">
      <ul class="uls">
        <li>湖北省</li>
        <li>广东省</li>
        <li>江苏省</li>
        <li>陕西省</li>
      </ul>
      <div class="box_bottom">
        <div class="item a" style="display: block;">1</div>
        <div class="item b">2</div>
        <div class="item c">3</div>
        <div class="item d">4</div>
      </div>
    </div>
    <script>
      $(function () {
        $(".uls li").click(function () {
          $(this).addClass("active").siblings().removeClass("active");
          let index = $(this).index();
         
          $(".box_bottom .item").eq(index).show().siblings().hide()
        });
      });
    </script>
  </body>
</html>
